package Zuoye6;

public abstract class Pet {
	public String name;
	public int health;
	public int love;
	public String sex;

	public Pet(){

	}

	public Pet(String name,int health,int love){
		this.name = name;
		this.health = health;
		this.love = love;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public int getHealth() {
		return health;
	}

	public void setHealth(int health) {
		if(health>0&&health<=100){
			this.health = health;
		}else{
			this.health=60;
		}
	}

	public abstract void print();

}
